<?php
class SiteController implements ControllerInterface{
	
	private $_view;
	
	public function __construct(){
		session_start();
		$view = $this->_view = new View();
		$fc = $this->_fontController = FontController::getInstance();
		if (lib::getItem('adminname')){
			//登陆成功
		}else{
			MessageBox::errorMessage("尚未登陆", "尚未登陆，请登陆", "admin/login");
		}
	}
	
	public function IndexAction(){
		$view = $this->getView();
		$fc = $this->getFontController();
		$body = $view->render("site/index.php");
		$fc->setBody($body);
	}
	
	public function SittingAction(){
		$view = $this->getView();
		$fc = $this->getFontController();
		$view->name = 'ok';
		$body = $view->render("site/sitting.php");
		$fc->setBody($body);
	}
	
	public function AboutAction(){
		$view = $this->getView();
		$body = $view->render("site/about.php");
		$fc->setBody($body);
	}
	
	public function getView(){
		return $this->_view;
	}
	
	public function getFontController(){
		return $this->_fontController;
	}
	
	
	
}